{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "Python Matrices.ipynb",
      "provenance": [],
      "authorship_tag": "ABX9TyMLi612WitaVmks/oye9y7r",
      "include_colab_link": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/natnew/100-Python-Projects/blob/main/Python_Matrices.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 1,
      "metadata": {
        "id": "WP8x2EnjJp-7"
      },
      "outputs": [],
      "source": [
        "# import the important module in python\n",
        "import numpy as np\n",
        "          \n"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "# make matrix with numpy\n",
        "snan = np.matrix('[64, 1; 12, 3]')\n",
        "          \n",
        "# applying matrix.max() method\n",
        "nat = snan.max()\n",
        "    \n",
        "print(nat)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "n493u4JNJtas",
        "outputId": "a6668f81-db6a-4eb2-af58-7224f9cb97a4"
      },
      "execution_count": 2,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "64\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "# make matrix with numpy\n",
        "val = [['Natasha',101,90,95], ['John',102,85,100], ['Sara',103,90,95]]\n",
        "\n",
        "#print values at a given index (list)\n",
        "print(val[2])\n",
        "\n",
        "#print values at a given index (index in list)\n",
        "print(val[0][1])"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "fY-zD77KJ36B",
        "outputId": "788f07de-bd9f-4f3e-ff68-f59008bf7181"
      },
      "execution_count": 4,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "['Sara', 103, 90, 95]\n",
            "101\n"
          ]
        }
      ]
    }
  ]
}